/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * FrmRegistroPresenca.java
 *
 * Created on 04/10/2009, 10:55:44
 */

package matricula.telas;

import java.awt.Image;
import java.awt.Toolkit;
import java.net.URL;
import javax.swing.UIManager;

/**
 *
 * @author Gabi
 */
public class FrmRegistroPresenca extends javax.swing.JFrame {

    /** Creates new form FrmRegistroPresenca */
    public FrmRegistroPresenca() {
        initComponents();
        setVisible(true);
        this.setLocationRelativeTo(null);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        painelRegistroPresencajPanel = new javax.swing.JPanel();
        painelCursojPanel = new javax.swing.JPanel();
        nomeCursojLabel = new javax.swing.JLabel();
        horariojLabel = new javax.swing.JLabel();
        nomeCursojComboBox = new javax.swing.JComboBox();
        horariojComboBox = new javax.swing.JComboBox();
        nomeProfessorjLabel = new javax.swing.JLabel();
        nomeProfessorjTextField = new javax.swing.JTextField();
        registroPresencajScrollPane = new javax.swing.JScrollPane();
        registroPresencajTable = new javax.swing.JTable();
        salvarFecharPainel = new javax.swing.JPanel();
        salvarTelajButton = new javax.swing.JButton();
        fecharTelajButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Registro de Presença");
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        painelRegistroPresencajPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        URL url = this.getClass().getResource("/imagens/logo_mini.png");
        Image imagemTitulo = Toolkit.getDefaultToolkit().getImage(url);
        this.setIconImage(imagemTitulo);
        try{
            UIManager.setLookAndFeel("com.birosoft.liquid.LiquidLookAndFeel");
        }catch (Exception e){
            e.printStackTrace();
        }
        painelRegistroPresencajPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        painelCursojPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        painelCursojPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        nomeCursojLabel.setText("Nome do Curso");
        painelCursojPanel.add(nomeCursojLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 13, -1, -1));

        horariojLabel.setText("Horario");
        painelCursojPanel.add(horariojLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 13, -1, -1));

        nomeCursojComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Curso de Marcenaria", "Curso Pintura em Tecido", "Curso de Decoupage", "Curso de Biscuit" }));
        painelCursojPanel.add(nomeCursojComboBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, 360, -1));

        horariojComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "07:30", "10:00", "14:00", "16:00" }));
        painelCursojPanel.add(horariojComboBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 30, 100, -1));

        nomeProfessorjLabel.setText("Nome do Professor");
        painelCursojPanel.add(nomeProfessorjLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 60, -1, -1));

        nomeProfessorjTextField.setEditable(false);
        painelCursojPanel.add(nomeProfessorjTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 77, 480, -1));

        painelRegistroPresencajPanel.add(painelCursojPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, 520, 110));

        registroPresencajTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "Nome do Associado/Dependente", "Presença", "Falta"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, true, true
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        registroPresencajTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        registroPresencajTable.getTableHeader().setReorderingAllowed(false);
        registroPresencajScrollPane.setViewportView(registroPresencajTable);
        registroPresencajTable.getColumnModel().getColumn(0).setMinWidth(357);
        registroPresencajTable.getColumnModel().getColumn(0).setPreferredWidth(357);
        registroPresencajTable.getColumnModel().getColumn(0).setMaxWidth(357);
        registroPresencajTable.getColumnModel().getColumn(1).setMinWidth(80);
        registroPresencajTable.getColumnModel().getColumn(1).setPreferredWidth(80);
        registroPresencajTable.getColumnModel().getColumn(1).setMaxWidth(80);
        registroPresencajTable.getColumnModel().getColumn(2).setMinWidth(80);
        registroPresencajTable.getColumnModel().getColumn(2).setPreferredWidth(80);
        registroPresencajTable.getColumnModel().getColumn(2).setMaxWidth(80);

        painelRegistroPresencajPanel.add(registroPresencajScrollPane, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 140, 520, 260));

        salvarFecharPainel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        salvarFecharPainel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        salvarTelajButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/tick.png"))); // NOI18N
        salvarTelajButton.setText("Salvar");
        salvarTelajButton.setToolTipText("Salvar");
        salvarTelajButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                salvarTelaActionPerformed(evt);
            }
        });
        salvarFecharPainel.add(salvarTelajButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 8, -1, -1));

        fecharTelajButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/cross.png"))); // NOI18N
        fecharTelajButton.setText("Fechar");
        fecharTelajButton.setToolTipText("Fechar");
        fecharTelajButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                fecharTelaActionPerformed(evt);
            }
        });
        salvarFecharPainel.add(fecharTelajButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 7, -1, -1));

        painelRegistroPresencajPanel.add(salvarFecharPainel, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 410, 250, 40));

        getContentPane().add(painelRegistroPresencajPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 560, 460));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void fecharTelaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fecharTelaActionPerformed
        // TODO add your handling code here:
        this.dispose();
}//GEN-LAST:event_fecharTelaActionPerformed

    private void salvarTelaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_salvarTelaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_salvarTelaActionPerformed

    /**
    * @param args the command line arguments
    */
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton fecharTelajButton;
    private javax.swing.JComboBox horariojComboBox;
    private javax.swing.JLabel horariojLabel;
    private javax.swing.JComboBox nomeCursojComboBox;
    private javax.swing.JLabel nomeCursojLabel;
    private javax.swing.JLabel nomeProfessorjLabel;
    private javax.swing.JTextField nomeProfessorjTextField;
    private javax.swing.JPanel painelCursojPanel;
    private javax.swing.JPanel painelRegistroPresencajPanel;
    private javax.swing.JScrollPane registroPresencajScrollPane;
    private javax.swing.JTable registroPresencajTable;
    private javax.swing.JPanel salvarFecharPainel;
    private javax.swing.JButton salvarTelajButton;
    // End of variables declaration//GEN-END:variables

}
